package sym.qrcode.encoder;

public class MosaicMatrix {

	private Mosaic[][] mosaics;
	private int height;
	private int width;
	
	public Mosaic[][] getMosaics() {
		return mosaics;
	}

	public void setMosaics(Mosaic[][] mosaics) {
		this.mosaics = mosaics;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public MosaicMatrix(int height, int width){
		this.height = height;
		this.width = width;
		mosaics = new Mosaic[height][width];
	}
	
	public Mosaic get(int x,int y){
		return mosaics[y][x];
	}
	
	public void set(int x,int y,Mosaic m){
		mosaics[y][x] = m;
	}
	public void clear(){
		for (int y = 0; y < height; ++y) {
		      for (int x = 0; x < width; ++x) {
		    	  mosaics[y][x] = new Mosaic();
		      }
		    }
	}
}
